<?php

return [
    [
        'name' => '__tips__',
        'title' => '温馨提示',
        'type' => 'string',
        'content' => [],
        'value' => '1. <b><font color="red">本窗口的所有配置项，非技术人员不建议进行调整</font></b><br>'."\r\n"
            .'                      2. 若需开启wss协议，请先配置<b>ssl证书</b>、<b>ssl证书KEY</b>并重启Workerman服务，才会生效；https站点必须配置wss<br>'."\r\n"
            .'                      3. 仅需对外开放<b>WebSocket端口</b>，另外的两项端口<b>未被占用</b>即可<br>'."\r\n"
            .'                      4. 消息提醒铃声建议大小100kb，文件无法上传请参考插件文档<a target="_blank" href="https://doc.fastadmin.net/kefu/38.html">常见问题</a>',
        'rule' => '',
        'msg' => '',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'wss_switch',
        'title' => 'wss协议',
        'type' => 'radio',
        'content' => [
            '不开启',
            '开启',
        ],
        'value' => '1',
        'rule' => '',
        'tip' => '请先参考常见问题配置好wss服务再开启，否则将无法链接',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'ssl_cert',
        'title' => 'ssl证书',
        'type' => 'string',
        'content' => [],
        'value' => '/www/server/panel/vhost/cert/k.niukewang.com/fullchain.pem',
        'rule' => '',
        'tip' => '请填写证书pem或crt文件的绝对路径',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'ssl_cert_key',
        'title' => 'ssl证书KEY',
        'type' => 'string',
        'content' => [],
        'value' => '/www/server/panel/vhost/cert/k.niukewang.com/privkey.pem',
        'rule' => '',
        'tip' => '请填写证书密匙(key)文件的绝对路径',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'websocket_port',
        'title' => 'WebSocket端口',
        'type' => 'string',
        'content' => [],
        'value' => '1818',
        'rule' => 'required,range(1024~65535)',
        'tip' => '请在安全组、防火墙等开放此端口',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'register_port',
        'title' => '服务注册端口',
        'type' => 'string',
        'content' => [],
        'value' => '1260',
        'rule' => 'required,range(1024~65535)',
        'tip' => '无需对外开放,属未被占用的端口即可',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'internal_start_port',
        'title' => '内部通讯起始端口',
        'type' => 'string',
        'content' => [],
        'value' => '3200',
        'rule' => 'required,range(1024~65535)',
        'tip' => '无需对外开放,属未被占用的端口即可',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'gateway_process_number',
        'title' => 'Gateway进程数',
        'type' => 'string',
        'content' => [],
        'value' => '1',
        'rule' => '',
        'tip' => '设置为CPU核数相等的数量性能最好',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'worker_process_number',
        'title' => 'BusinessWorker进程数',
        'type' => 'string',
        'content' => [],
        'value' => '2',
        'rule' => '',
        'tip' => '根据业务有无阻塞式IO,设为CPU核数的1-3倍',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'ringing',
        'title' => '消息提醒铃声',
        'type' => 'file',
        'content' => [],
        'value' => '/assets/addons/kefu/audio/message_prompt.wav',
        'rule' => 'required,file',
        'tip' => '',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'theme',
        'title' => '主题模板',
        'type' => 'string',
        'content' => [],
        'value' => 'default',
        'rule' => 'required',
        'msg' => '',
        'tip' => '请确保addons/kefu/view有相应的目录',
        'ok' => '',
        'extend' => '',
    ],
    [
        'name' => 'rule_out_url',
        'title' => '以下页面不启动<br>(一行一个)',
        'type' => 'text',
        'content' => [],
        'value' => 'http://kefu_local.com/index/user/index.html?tip=自动排除对应https地址、带参数地址，此处的URL带参数无效',
        'rule' => '',
        'tip' => '这些前台页面将不启动在线客服',
        'ok' => '',
        'extend' => '',
    ],
];
